home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cstdio.arc
/
SRC.ARC
/
UNGETC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1984-07-28
|
387b
|
19 lines
/* ungetc.c - push character back into input stream.
(C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
G. R. Mansfield. 84/07/26.
Ver 1.0-4726.
*/
#include <stdio.h>
ungetc(c, fp) /* push character back into input stream */
char c;
FILE *fp;
{
if (fp->_flag & _READ && fp->_ptr != NULL) {
fp->_cnt++;
return(*--fp->_ptr = c);
}
return(EOF);
}